package com.cn.march.controller;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cn.march.base.protocol.BaseReqData;
import com.cn.march.model.BankLogo;
import com.cn.march.service.BankLogoService;

@Controller
@RequestMapping("/bankLogo")
public class BankLogoController {

	@Autowired
	private BankLogoService bankLogoService;

	@RequestMapping(value = "/showPage")
	public String showPage(Model model) {
		BankLogo bankLogo = bankLogoService.selectById(1);
		model.addAttribute("bankLogo", bankLogo);
		return "bankLogo";
	}

	@RequestMapping(value = "getData")
	@ResponseBody
	public String getData(@Valid BaseReqData data) {
		return data.getAge()+"";
	}
}
